#include "FreeRTOS.h"
#include "task.h"
#include "main.h"
#include "cmsis_os.h"
#include "DJI_motor.h"
#include "lcd.h"
#include "BMI088driver.h"
#include "stdio.h"
#include "bsp_dwt.h"

#include "usart.h"
#include "ARM.h"
uint8_t buff[] = {0x01, 0x03, 0x00, 0x10, 0x00, 0x01, 0x85, 0xCF};
uint8_t sbuff[20];
uint16_t dis;

uint16_t getDis(uint8_t *head)
{
    return (uint16_t)head[3] << 8 | head[4];
}

void init(void *argument)
{
    
    DWT_Init(480);//DWT初始化
    osDelay(100);
    DJI_Init();
    printf("sys init\n");
	osDelay(100);
//	int i= HAL_UARTEx_ReceiveToIdle_DMA(&huart1, RxData, 20);
//	printf("%d\n",i);
    // power5_on;
    // power2_on;
    // DJLM01.target_angle=0;
    // DJLM02.target_angle=0;
    // DJRM01.target_angle=0;
    // DJRM02.target_angle=0;
    vTaskDelete(NULL);
}